import Vue from 'vue'
import { $post, $get } from './http'
import store from './store'
import App from './App.vue'
import router from './router'
import i18n from 'utils/js/i18n' // 国际化
import VueClipboard from 'vue-clipboard2' // copy插件
import 'utils/js/message'

// resetcss
import '@/utils/styl/reset.styl'
import Headers from 'components/Header'

// import plugins
import attachFastClick from 'fastclick'
import 'lib-flexible/flexible'

// 设置locale
if (!localStorage.languageType) {
  localStorage.languageType = 'zh'
}

// fastClick
attachFastClick.attach(document.body)

Vue.use(VueClipboard)
// 设置全局header
Vue.component('Headers', Headers)
Vue.config.productionTip = false

// 扩展axios
Vue.prototype.$post = $post
Vue.prototype.$get = $get

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
